﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace MyFinanceManager.PC
{
    /// <summary>
    /// Interaction logic for ucNewViewAuswertung.xaml
    /// </summary>
    public partial class ucNewViewAuswertung : UserControl
    {
        public ucNewViewAuswertung()
        {
            InitializeComponent();
            //this.graphViewer.Visibility = Visibility.Hidden;
            //this.catViewer.Visibility = Visibility.Hidden;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            foreach (var item in this.LayoutRoot.Children)
            {
                if (item is UserControl)
                {
                    ((UserControl)item).Visibility = Visibility.Hidden;
                }
            }

            if (sender is Button)
            {
                string text = (string)((Button)sender).Tag;
                UserControl uc = this.FindName(text) as UserControl;
                if (uc != null)
                {
                    uc.Visibility = Visibility.Visible;
                }
            }
        }
    }
}
